import request from "@/utils/request";

export function login(data) {
  return request({
    url: "/Admins/login",
    method: "post",
    data
  });
}
export function logout() {
  return request({
    url: "/Admins/logout",
    method: "post"
  });
}
export function updatePwd(data) {
  return request({
    url: "/Admins/modify_pwd",
    method: "post",
    data
  });
}

// 用户管理
export function fetchList(data) {
  return request({
    url: "/users/index",
    method: "post",
    data
  });
}

export function exportExcel(data) {
  return request({
    url: "/users/export",
    method: "post",
    data,
    responseType: "blob"
  });
}

export function getUserInfo(data) {
  return request({
    url: "/users/read",
    method: "post",
    data
  });
}
